package com.sskj.gocoin.p.activity;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.gocoin.MyAppLication;
import com.sskj.gocoin.m.HttpConfig;
import com.sskj.gocoin.m.bean.FundBean;
import com.sskj.gocoin.m.bean.HttpData;
import com.sskj.gocoin.m.http.JsonCallBack;
import com.sskj.gocoin.p.base.BasePresenter;
import com.sskj.gocoin.v.activity.FundManagementActivity;

/**
 * ProjectName：new_bfex
 * DESC: (类描述)
 * Created by 李岩 on 2018/7/11 0011
 * updateName:(修改人名称)
 * updateTime:(修改时间)
 * updateDesc:(修改内容)
 */
public class FundManagementPresenter extends BasePresenter<FundManagementActivity>{


    public void requestData(){

        OkGo.<HttpData<FundBean>>post(HttpConfig.BASE_URL + HttpConfig.FUND_MANAGEMENT)
                .params("account", MyAppLication.getAccount())
                .params("p", MyAppLication.getAccount())
                .execute(new JsonCallBack<HttpData<FundBean>>(this, false) {
                    @Override
                    protected void _onSuccess(Response<HttpData<FundBean>> response) {
                        mView.onDataSuccess(response.body().getData());
                    }
                });
    }
}
